-- GENERATED SPELL FOR [Varedis] --


function spell0_21178(pUnit, Event) --@Curse of Flames,n/a--
pUnit:FullCastSpellOnTarget(38010,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21178', 662, 1)
end

function spell1_21178(pUnit, Event) --@Evasion,Self--
pUnit:FullCastSpellOnTarget(37683,pUnit)
pUnit:RegisterEvent('Sorts_21178', 10298, 1)
end

function spell2_21178(pUnit, Event) --@Mana Burn,n/a--
pUnit:FullCastSpellOnTarget(39262,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21178', 1000, 1)
end

function Sorts_21178(pUnit, Event)
local choix_sorts_21178 = math.random(0, 2)
if choix_sorts_21178 == 0 then
pUnit:RegisterEvent('spell0_21178', 1, 1)
end
if choix_sorts_21178 == 1 then
pUnit:RegisterEvent('spell1_21178', 1, 1)
end
if choix_sorts_21178 == 2 then
pUnit:RegisterEvent('spell2_21178', 1, 1)
end
end

function mob21178_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21178', math.random(1500, 3000), 1)
end

function mob21178_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21178_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21178_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21178, 1, 'mob21178_Action')
RegisterUnitEvent(21178, 2, 'mob21178_Leave')
RegisterUnitEvent(21178, 3, 'mob21178_Kill')
RegisterUnitEvent(21178, 4, 'mob21178_Die')
